<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class SignUpRequest extends FormRequest
{

    public function rules()
    {
        return [
            'name'=> 'required',
            'school_id'=>'required',
            'sex'=>'required',
            'nation'=>'required',
            'police_station_id'=>'required',
            'id_code'=>'required',
            'entity_id'=>'required',
            'relation'=>'required',
            'prophylactic_code'=>'required',
            'section_id'=>'required',

            'father_name'=> 'required',
            'father_id_code'=>'required',
            'father_works'=>'required',
            'father_phone_number'=>'required',
            'mother_name'=>'required',
            'mother_id_code'=>'required',
            'mother_works'=>'required',
            'mother_phone_number'=>'required',
            'family_address'=>'required'
        ];
    }
    /**
     * @return array
     */
    public function messages()
    {
        return [
            'name.required'=>'幼儿姓名必填',
            'school_id.required'=>'所属幼儿园必填',
            'sex.required'=>'性别必填',
            'nation.required'=>'民族必填',
            'police_station_id.required'=>'所属派出所必填',
            'id_code.required'=>'身份证号必填',
            'entity_id.required'=>'对应实体编号必填',
            'relation.required'=>'幼儿与户主关系必填',
            'prophylactic_code.required'=>'儿童预防接种证号码必填',
            'section_id.required'=>'片区号必填',

            'father_name.required'=>'父亲姓名必填',
            'father_id_code.required'=>'父亲身份证号码必填',
            'father_works.required'=>'父亲工作单位必填',
            'father_phone_number.required'=>'父亲手机号必填',
            'mother_name.required'=>'母亲姓名必填',
            'mother_id_code.required'=>'母亲身份证号码必填',
            'mother_works.required'=>'母亲工作单位必填',
            'mother_phone_number.required'=>'母亲手机号必填',
            'family_address.required'=>'家庭住址必填'
        ];
    }

}
